home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / cuj9205.zip / 1005113A < prev    next >
Text File  |  1992-06-02  |  1KB  |  40 lines

  1.  
  2. Listing 3
  3. ***************
  4.  
  5. void _far your_error_handler(
  6.    unsigned device_error, 
  7.    unsigned dos_error, 
  8.    unsigned _far *header
  9. );
  10.  
  11. main()
  12.         {
  13.         /* Set up your handler as the handler */
  14.         _harderr( your_error_handler);
  15.  
  16.         /* Remainder of your code */    
  17.         }       
  18.  
  19. void _far your_error_handler(
  20.    unsigned device_error,  /* Device error code */
  21.    unsigned dos_error,     /* Dos error code */ 
  22.    unsigned _far *header   /* This is the device header */
  23. )
  24.         {
  25.         /* Test the device error and the dos error, as appropriate */
  26.         
  27.         /* Inside of your routine, you need to call one or more 
  28.                 of the following */             
  29.         /* To retry */
  30.             _hardresume( _HARDERR_RETRY );
  31.         /* To abort */
  32.             _hardresume( _HARDERR_ABORT );
  33.         /* To ignore */
  34.             _hardresume(_HARDERR_IGNORE);       
  35.         /* To return to DOS (continue with program) */
  36.             _hardretn( doserr );
  37.  
  38.         }
  39.  
  40.